import { createSSRApp } from 'vue'
import App from './App'
import { createPinia } from 'pinia'
import mixin from './common/mixin'
import uviewPlus from '@/uni_modules/uview-plus'
import { initRequest } from './util/request/index'

const pinia = createPinia()

export function createApp() {
    const app = createSSRApp(App)
    initRequest(app)
    app.use(pinia).use(uviewPlus)
    app.mixin(mixin)
    return {
        app
    }
}